import React from 'react'
import ReactDOM from 'react-dom'

function formatDate() {
  const element = (
    <div>
      <h1>hello word</h1>
      <h1>it is { new Date().toLocaleTimeString()}</h1>
    </div>
  )
  ReactDOM.render(
    element,
    document.getElementById('root')
  )
}
setInterval(formatDate, 1000)